local button = CreateFrame("Button", "清垃圾", MerchantFrame)
button:SetWidth(36)
button:SetHeight(36)

button:SetPoint("RIGHT", MerchantRepairItemButton, "LEFT", -2, 0)

local texture = button:CreateTexture(nil, "BACKGROUND")
texture:SetTexture("Interface\\Icons\\INV_Misc_Coin_02")
texture:SetAllPoints(button)

button:SetPushedTexture("Interface\\Buttons\\UI-Quickslot-Depress")
button:SetHighlightTexture("Interface\\Buttons\\ButtonHilight-Square")
		



button:SetScript("OnClick", function()
	for i = 0, 4 do 
		for j = 1, GetContainerNumSlots(i) do
			local link = GetContainerItemLink(i, j)
			if ( link ) then
				local _, _, quality = GetItemInfo(link)
				if ( quality == 0 ) then
					PickupContainerItem(i, j)
					PickupMerchantItem()
				end
			end		
		end
	end
end)

MerchantRepairText:SetText("")